package com.minimalist.common.entity.tc.entity.vo.order;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.minimalist.common.config.mybatis.bo.PageReq;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 11987
 */
@Schema(name = "停车_订单查询实体")
public class TcOrderQueryVO extends PageReq implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "orderNumber", description = "订单号", type = "string")
    private String orderNumber;

    @Schema(name = "berthNumber", description = "泊位号", type = "string")
    private String berthNumber;

    @Schema(name = "pointCharge", description = "收费点", type = "string")
    private String pointCharge;

    @Schema(name = "enterDateRange", description = "驶入时间范围", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date[] enterDateRange;

    @Schema(name = "exitDateRange", description = "驶离时间范围", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date[] exitDateRange;

    @Schema(name = "plateNumber", description = "车牌号", type = "string")
    private String plateNumber;

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getBerthNumber() {
        return berthNumber;
    }

    public void setBerthNumber(String berthNumber) {
        this.berthNumber = berthNumber;
    }

    public String getPointCharge() {
        return pointCharge;
    }

    public void setPointCharge(String pointCharge) {
        this.pointCharge = pointCharge;
    }

    public Date[] getEnterDateRange() {
        return enterDateRange;
    }

    public void setEnterDateRange(Date[] enterDateRange) {
        this.enterDateRange = enterDateRange;
    }

    public Date[] getExitDateRange() {
        return exitDateRange;
    }

    public void setExitDateRange(Date[] exitDateRange) {
        this.exitDateRange = exitDateRange;
    }

    public String getPlateNumber() {
        return plateNumber;
    }

    public void setPlateNumber(String plateNumber) {
        this.plateNumber = plateNumber;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        TcOrderQueryVO that = (TcOrderQueryVO) o;
        return Objects.equals(orderNumber, that.orderNumber) &&
               Objects.equals(berthNumber, that.berthNumber) &&
               Objects.equals(pointCharge, that.pointCharge) &&
               Objects.deepEquals(enterDateRange, that.enterDateRange) &&
               Objects.deepEquals(exitDateRange, that.exitDateRange) &&
               Objects.equals(plateNumber, that.plateNumber);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), orderNumber, berthNumber, pointCharge, Objects.hashCode(enterDateRange), Objects.hashCode(exitDateRange), plateNumber);
    }

    @Override
    public String toString() {
        return "TcOrderQueryVO{" +
               "orderNumber='" + orderNumber + '\'' +
               ", berthNumber='" + berthNumber + '\'' +
               ", pointCharge='" + pointCharge + '\'' +
               ", enterDateRange=" + Objects.toString(enterDateRange) +
               ", exitDateRange=" + Objects.toString(exitDateRange) +
               ", plateNumber='" + plateNumber + '\'' +
               "} " + super.toString();
    }
}
